#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>
void myjiou(int* arr, int sz)
{
	assert(arr);
	int left = 0;
	int right = sz - 1;
	while (left < right)
	{
		while (left < right)
		{
			if (arr[left] % 2 == 0)
				break;
			left++;
		}
		while (left < right)
		{
			if (arr[right] % 2 == 1)
				break;
			right--;
		}
		if (left < right)
		{
			int t = arr[left];
			arr[left] = arr[right];
			arr[right] = t;
		}
	}
}
int main()
{
	int arr[] = { 1,2,3,4,5,6,7,8,9,10 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	myjiou(arr,sz);
	int i = 0;
	for (i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}